package type.proxy;

/**
 * @Date 2021/5/2 10:23 上午
 * @Author dengxin
 */
public class ProxyTest {

    private static void consume(DoSomething doSomething, String arg) {
        doSomething.doSomething();
        doSomething.doSomethingElse(arg);
    }

    public static void main(String[] args) {
        consume(new RealObject(), "Real Object Test.");
        consume(new ProxyObject(new RealObject()), "Proxy Object Test");
    }
}
